package com.example.houseman.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 户型厅
 * @author lzj
 *
 */
public enum HuXingTing {
	HUXING_HALL0("0",0),
	HUXING_HALL1("1",1),
	HUXING_HALL2("2",2);


	@JsonValue
	private String name;

	@EnumValue
	private int index;
	
	private HuXingTing( String name,int index) {
		this.index = index;
		this.name = name;
	}
	// 普通方法
	public static String getName(int index) {
		for (HuXingTing c : HuXingTing.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	

}
